﻿using System;
using System.Collections.Generic;
using FytSoa.Common;
using FytSoa.Model.Entity;
using FytSoa.Model.Sys;

namespace FytSoa.Application.Sys.Dto
{
    /// <summary>
    /// 前端提交用户信息
    /// </summary>
    public class SysAdminParam : Entity<string>
    {
        /// <summary>
        /// 所属角色
        /// <summary>
        public string Role { get; set; }

        /// <summary>
        /// 所属岗位
        /// <summary>
        public string Post { get; set; }

        /// <summary>
        /// 所属部门
        /// <summary>
        public string Organize { get; set; }

        /// <summary>
        /// 所属上级部门组
        /// <summary>
        public string OrganizeGroupId { get; set; }

        /// <summary>
        /// 登录账号
        /// <summary>
        public string LoginAccount { get; set; }

        /// <summary>
        /// 登录密码
        /// <summary>
        public string LoginPassWord { get; set; }

        /// <summary>
        /// 头像
        /// <summary>
        public string HeadPic { get; set; }

        /// <summary>
        /// 姓名
        /// <summary>
        public string FullName { get; set; }

        /// <summary>
        /// 手机号码
        /// <summary>
        public string Mobile { get; set; }

        /// <summary>
        /// 邮箱
        /// <summary>
        public string Email { get; set; }

        /// <summary>
        /// 性别
        /// <summary>
        public string Sex { get; set; }

        /// <summary>
        /// 状态
        /// <summary>
        public bool Status { get; set; } = true;

        /// <summary>
        /// 备注
        /// <summary>
        public string Summary { get; set; }
    }

    public class SysAdminWhereParam : PageParam
    {
        /// <summary>
        /// 角色ID查询
        /// </summary>
        public string role { get; set; }

        /// <summary>
        /// 部门查询
        /// </summary>
        public string organize { get; set; }

        /// <summary>
        /// 手机号码
        /// </summary>
        public string mobile { get; set; }

        /// <summary>
        /// 登录时间
        /// </summary>
        public string time { get; set; }
    }

    /// <summary>
    /// 返回给前端的属性
    /// </summary>
    public class SysAdminDto : Entity<string>
    {
        /// <summary>
        /// 所属角色
        /// <summary>
        public string RoleName { get; set; }

        /// <summary>
        /// 所属岗位
        /// <summary>
        public string PostName { get; set; }

        /// <summary>
        /// 所属部门
        /// <summary>
        public string OrganizeName { get; set; }

        /// <summary>
        /// 登录账号
        /// <summary>
        public string LoginAccount { get; set; }

        /// <summary>
        /// 头像
        /// <summary>
        public string HeadPic { get; set; }

        /// <summary>
        /// 姓名
        /// <summary>
        public string FullName { get; set; }

        /// <summary>
        /// 手机号码
        /// <summary>
        public string Mobile { get; set; }

        /// <summary>
        /// 邮箱
        /// <summary>
        public string Email { get; set; }

        /// <summary>
        /// 性别
        /// <summary>
        public string Sex { get; set; }

        /// <summary>
        /// 状态
        /// <summary>
        public bool Status { get; set; } = true;

        /// <summary>
        /// 备注
        /// <summary>
        public string Summary { get; set; }

        /// <summary>
        /// 登录时间
        /// <summary>
        public DateTime? LoginTime { get; set; }

        /// <summary>
        /// 上次登录时间
        /// <summary>
        public DateTime? UpLoginTime { get; set; }

        /// <summary>
        /// 登录次数
        /// <summary>
        public int LoginCount { get; set; } = 0;

        /// <summary>
        /// 创建时间
        /// <summary>
        public DateTime CreateTime { get; set; } = DateTime.Now;

        public SysOrganize organize { get; set; }
    }

    /// <summary>
    /// 修改返回的内容
    /// </summary>
    public class SysAdminSelect
    {
        /// <summary>
        /// 用户的基本信息
        /// </summary>
        public SysAdmin admin { get; set; }

        /// <summary>
        /// 所属部门
        /// </summary>
        public List<SysOrganizeSelect> organize { get; set; }

        /// <summary>
        /// 所属角色
        /// </summary>
        public List<SysRoleGroupList> role { get; set; }

        /// <summary>
        /// 所属岗位
        /// </summary>
        public List<SysPostSelect> post{ get; set; }
    }
        
}
